/*
已知今天的日期，请你推算若干天后是什么日期。

2018/2/14  22
2018/03/08
*/
#include<bits/stdc++.h>
using namespace std;
int main(){
	int year,month,day;
	int days;
	scanf("%d/%d/%d",&year,&month,&day);
	scanf("%d",&days);
	int date[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	day+=days;
	while(true){
		if((year%400==0)||(year%4==0&&year%100!=0)) date[2]=29;
        else date[2]=28;
		if(day>date[month]){
			day=day-date[month];
			month++;
		}else break;
		if(month>12){
			month=1;
			year++;
		}
		
	}
	printf("%04d/%02d/%02d",year,month,day);
} 